#  d1=dict(a=1,b=2,c=3)
# print('d1:',d1)
#
# d2=dict((('a',1),('b',2),('c',3)))
# print('d2:',d2)
#
# d3=dict((['a',1],['b',2],['c',3]))
# print('d3:',d3)
#
# d4=dict([['a',1],['b',2],['c',3]])
# print('d4:',d4)
#
# d5=dict([('a',1),('b',2),('c',3)])
# print('d5:',d5)

# k=['a','b','c']
# v=[1,2,3]
# d1=dict(zip(k,v))
# print(d1)
#
# l=[['a','b','c'],[1,2,3]]
# d2=dict(zip(*l))
# print(d2)

# d1=dict.fromkeys(['a','b','c','c'])
# print(d1)

import xlrd,xlwt
wb=xlrd.open_workbook('业绩去重表.xls')
ws=wb.sheet_by_name('Sheet1')
nwb=xlwt.Workbook(encoding='utf-8')
nws=nwb.add_sheet('结果')
l=[ws.col_values(0),ws.col_values(1),ws.col_values(3)]
d=dict.fromkeys(zip(*l))
r=0
for i in d:
    nws.write(r,0,i[0])
    nws.write(r,1,i[1])
    nws.write(r,2,i[2])
    r+=1
nwb.save('aaa.xls')






